class code2 {
    //思路1：A个B相加
    public int multiply(int A, int B) {
        if(B == 0) return 0;
        if(B == 1) return A;
        return A + multiply(A,B-1);
    }
}